package org.microframework.cloud.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableDiscoveryClient
@EnableAsync
@EnableCaching
@LoadBalancerClients  // 使用默认的LoadBalancer配置
@SpringBootApplication//(exclude = {DataSourceAutoConfiguration.class})
@EnableFeignClients(basePackages = "org.microframework.base.feign") // 启用Feign客户端
@ComponentScan(basePackages = {
    "org.microframework.cloud.auth",
    "org.microframework.base.core.swagger",  // 扫描micro-base-swagger配置
    "org.microframework.base.core.security", // 扫描micro-base-security配置
    "org.microframework.base.core" ,         // 扫描micro-base-core配置
    "org.microframework.base.feign.*"          // 扫描micro-base-feign配置
    
})
public class AuthApplication {

    public static void main(String[] args) {
        SpringApplication.run(AuthApplication.class, args);
    }
} 